The present invention concerns in general terms digital signal coding and proposes for this purpose a digital signal coding device and method. It also concerns a decoding method and device corresponding to the coding method and device.
The purpose of coding is to compress the signal, which makes it possible to transmit or respectively store the digital signal whilst reducing the transmission time or transmission rate or respectively reducing the memory space used.
The invention is situated in the field of the compression of digital signals with loss. The digital signals considered here are of any nature, for example fixed images, video, sound or computer data.
Hereinafter, the coding and decoding of a fixed image is more particularly considered.
The French patent application No. 97 10804 filed by the applicant proposes to code a set of digital data according to several coding modes. Thus different parts of the data are coded according to different coding modes so as to obtain a good compression to distortion ratio. Additional data is joined to the coding data in order to indicate on which parts of the data set each coding mode is used. The additional data is used during the subsequent decoding. However, this additional data reduces the degree of compression.
French patent application No. 99 04401 filed by the applicant proposes to improve this technique, by not transmitting any additional data. The degree of compression is thus higher.
In this case, during decoding, all the possible decoding modes are tested on each part of the data set and the most likely mode is adopted. This technique has the drawback that errors in the choice of the decoding mode may occur during decoding. These errors then give rise to distortion on the decoded data.
The present invention aims to remedy the drawbacks of the prior art, by providing a coding method and device which use two coding modes for different parts of the data to be coded, whilst not requiring any additional information for indicating the coding mode used on each part.
To this end, the invention proposes a method of coding a set of coefficients representing physical quantities,
characterized in that it includes the steps of:
selecting, for each coefficient to be coded, a first or second coding mode according to a coding cost, the first coding mode including the calculation of an amplitude model, and the determination of a path amongst the coefficients,
coding the length of the path,
coding the coefficients for which the first coding mode has been selected, by the first coding mode,
coding the coefficients for which the second coding mode has been selected, by the second coding mode.
The invention thus affords a good compression to distortion ratio, since different parts of the signal are coded according to a coding mode which minimizes the coding cost. Moreover, no additional information is necessary for indicating which coding mode is used on which part of the signal. During the subsequent decoding, there is no risk of error in the choice of the decoding mode to be used.
According to a preferred characteristic, the data set is a block of data formed in a larger data set. Processing by block makes it possible to limit the memory size necessary for the calculations.
According to another preferred characteristic, the data set is a set previously transformed by a discrete cosine or discrete wavelet transformation.
According to a preferred characteristic, the coding cost includes the transmission rate of the data coded according to the first coding mode. Thus the coding mode is chosen according to the transmission rate of the coded data.
According to a preferred characteristic, the coding cost includes the distortion of the data coded according to the first coding mode. Thus the coding mode is chosen according to the distortion caused by the coding.
Naturally, the coding mode can be chosen according to a combination of the transmission rate and distortion.
According to a preferred characteristic, the second coding mode is JPEG coding. This coding mode is commonly used for coding fixed images.
According to a preferred characteristic, the method also includes the steps of:
calculating the coding cost of the coefficients of the path by the second coding mode,
coding the set of coefficients according to the second coding mode if the coding cost by the second coding mode is less than the coding cost by the first coding mode, on the path.
This case corresponds to the limit case in which the path has zero length.
The invention also relates to a method of decoding a data set previously coded by the method previously presented, characterized in that it includes the steps of:
decoding the length of the path,
decoding the coefficients belonging to the path, according to a first decoding mode,
decoding the other coefficients according to a second decoding mode.
The decoding method first of all makes it possible to determine the number of coefficients which have been coded according to the first coding mode, then to decode these coefficients and finally to decode the other coefficients according to the second decoding mode.
Correlatively, the invention concerns a device for coding a set of coefficients representing physical quantities, characterized in that it has:
means for selecting, for each coefficient to be coded, a first or second coding mode according to a coding cost, the first coding mode including the calculation of an amplitude model, and the determination of a path amongst the coefficients,
means for coding the length of the path,
means for coding the coefficients for which the first coding mode has been selected, by the first coding mode,
means for coding the coefficients for which the second coding mode has been selected, by the second coding mode.
The coding device has means for implementing the previously presented coding characteristics.
The invention also concerns a device for decoding a data set previously coded by the device presented above, characterized in that it has:
means for decoding the length of the path,
means for decoding the coefficients belonging to the path, according to a first decoding mode,
means for decoding the other coefficients according to a second decoding mode.
The decoding device has means for implementing the decoding characteristics previously presented.
The coding device and the decoding method and device have advantages similar to those presented above.
The invention also concerns a digital apparatus including the device according to the invention, or means for implementing the method according to the invention. This digital apparatus is for example a digital photographic apparatus, a digital camcorder, a scanner, a printer, a photocopier or a facsimile machine. The advantages of the device and of the digital apparatus are identical to those set out above.
The invention also concerns an information storage means which can be read by a computer or by a microprocessor, integrated or not into the device, possibly removable, storing a program implementing the methods according to the invention.
The invention also concerns a computer program which can be read by a microprocessor and containing one or more sequences of instructions which is able to implement the methods according to the invention.